package com.longqin.wechat.feign;

import java.util.Map;

import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import com.longqin.wechat.entity.ResponseData;
import com.longqin.wechat.util.ResponseEnum;

/**
 * feign熔断
 */
@Component
public class FeignServiceFallback implements FeignService {

	@Override
	public ResponseData<Object> getWorkFlowProcessList(@RequestParam(value = "workId") Integer workId){
		return new ResponseData<Object>(ResponseEnum.ERROR.getCode(), "获取工作所有表单失败");
	}
	
	@Override
	public ResponseData<Object> getFlowProcessForm(@RequestParam(value = "processId") Integer processId){
		return new ResponseData<Object>(ResponseEnum.ERROR.getCode(), "获取流程进程表单失败");
	}
	
	@Override
	public ResponseData<Object> dealWork(@RequestBody Map<String,Object> params){
		return new ResponseData<Object>(ResponseEnum.ERROR.getCode(), "处理失败");
	}
	
	@Override
	public ResponseData<Object> getFlowBeginNodeForm(@RequestParam(value = "flowId") Integer flowId){
		return new ResponseData<Object>(ResponseEnum.ERROR.getCode(), "获取流程开始节点表单失败");
	}
}
